import React, {useEffect, useState} from "react";
import {
    Badge,
    Drawer,
    Button,
    DatePicker,
    Form,
    Input,
    message,
    Modal,
    Select,
    Space,
    Table,
    Tag,
    Tooltip,
    Upload,
    Checkbox,
} from "antd";
import {
    PlusOutlined,
    UploadOutlined,
    CheckCircleTwoTone,
} from "@ant-design/icons";
import services from "../services";
import moment from "moment";
import ProgressAnalysis from "../analysis/ProgressAnalysis";
import ScoreAnalysis from "../analysis/ScoreAnalysis";
import CompletionTimeAnalysis from "../analysis/CompletionTimeAnalysis";
import EasyTypeAnalysis from "../analysis/EasyTypeAnalysis";
import {CheckboxChangeEvent} from "antd/es/checkbox";

const {Option} = Select;
const workTypeEnum = [
    {id: 0, option: "闭卷考试", color: "red"},
    {id: 1, option: "开卷考试", color: "orange"},
    {id: 2, option: "实验/上机考试", color: "green"},
    {id: 3, option: "课程论文/报告", color: "blue"},
    {id: 4, option: "课堂表现", color: "purple"},
];

const progressEnum = [
    {id: 0, status: "processing", text: "进行中"},
    {id: 1, status: "processing", text: "未开始"},
    {id: 2, status: "success", text: "已提交"},
    {id: 3, status: "error", text: "已过期"},
];

const easyTypeEnum = [
    {id: 1, color: "#55acee", text: "很容易"},
    {id: 2, color: "#2db7f5", text: "容易"},
    {id: 3, color: "#87d068", text: "中等"},
    {id: 4, color: "#ff9999", text: "难"},
    {id: 5, color: "#f50", text: "很难"},
];

const Work = () => {
    const [addWorkVisible, setAddWorkVisible] = useState(false);
    const [workType, setWorkType] = useState();
    const [allCourse, setAllCourse] = useState([]);
    const [courseId, setCourseId] = useState();
    const [workList, setWorkList] = useState([]);
    const [expandedRowKeys, setExpandedRowKeys] = useState([]);
    const [addLearnRecordVisible, setAddLearnRecordVisible] = useState(false);
    const [handDeleteRecordWorkId, setHandDeleteRecordWorkId] = useState();
    const [visible, setVisible] = useState(false); //控制抽屉的显示和隐藏状态
    const [drawerData, setDrawerData] = useState();
    const [addLearnRecordForm] = Form.useForm();
    const [addWorkForm] = Form.useForm();
    const [selectedRowIds, setSelectedRowIds] = useState([]);
    const [editLearnRecordVisible, setEditLearnRecordVisible] = useState(false);
    const [editLearnRecordForm] = Form.useForm();
    const [editWorkForm] = Form.useForm();
    const [editWorkVisible, setEditWorkVisible] = useState(false);


    const OnQueryWork = () => {
        setWorkList([]);
        services
            .queryWork({workType: workType, courseId: courseId})
            .then((data) => {
                setWorkList(data?.list || []);
            });
    };
    useEffect(() => {
        services.queryAllCourse().then((data) => {
            setAllCourse(data);
        });
        services.queryWork({workType: "", courseId: ""}).then((data) => {
            setWorkList(data?.list || []);
        });
    }, []);

    function validateNumber(rule: any, value: any, callback: any) {
        const number = parseFloat(value);
        if (isNaN(number)) {
            callback("请输入有效数字");
        } else if (number < 0 || number > 100) {
            callback("请输入0到100之间的数字");
        } else {
            callback();
        }
    }

    const handleUploadChange = (info: any) => {
        const {status, response = {}} = info.file;
        if (status !== "done") {
            return;
        }
        console.log(status);
        console.log(response);
        if (response.code !== 200) {
            message.error(response.msg);
            return;
        }
        if (response.data.allSuccessFlag) {
            message.success("附件导入成功");
            OnQueryWork();
        }
    };

    const handleDownload = () => {
        const downloadLink = document.createElement('a');
        downloadLink.href = '../images/学习记录导入模板.xlsx'; // 将文件的相对路径设置为 href
        downloadLink.download = '学习记录导入模板.xlsx'; // 将文件名设置为 download 属性
        document.body.appendChild(downloadLink);
        downloadLink.click(); // 触发点击事件
        document.body.removeChild(downloadLink);
    };


    const handleCheckboxChange = (event: CheckboxChangeEvent, id: any) => {
        if (event.target.checked) {
            // @ts-ignore
            setSelectedRowIds([...selectedRowIds, id]);
        } else {
            setSelectedRowIds(selectedRowIds.filter((rowId) => rowId !== id));
        }
    };

    const workHeaders = [
        {
            title: "编号",
            dataIndex: "workNo",
            key: "workNo",
        },
        {
            title: "作业名称",
            dataIndex: "name",
            key: "name",
        },
        {
            title: "作业类型",
            dataIndex: "workType",
            key: "workType",
            render: (text: any, record: any) => {
                let foundOption = workTypeEnum.find(
                    (item) => item.id === record.workType
                );
                const option = foundOption
                    ? foundOption
                    : {id: -1, option: "未知", color: "gray"};
                return <Tag color={option.color}>{option.option}</Tag>;
            },
        },
        {
            title: "所属课程",
            dataIndex: "courseName",
            key: "courseName",
        },
        {
            title: '备注',
            dataIndex: 'remark',
            key: 'remark',
            render: (text: any, record: any) => (
                <div style={{
                    display: 'flex',
                    alignItems: 'center',
                    width: '200px',
                }}>
                    <Tooltip title={`${text}`}>
                        <div style={{
                            whiteSpace: 'nowrap',
                            overflow: 'hidden',
                            textOverflow: 'ellipsis',
                        }}>
                            {text}
                        </div>
                    </Tooltip>
                </div>
            )
        },
        {
            title: "操作",
            render: (text: any, record: any) => (
                <div
                    style={{
                        width: "100%",
                        overflow: "hidden",
                        textOverflow: "ellipsis",
                    }}
                >
                    <Button
                        onClick={() => {
                            setEditWorkVisible(true);
                            editWorkForm.setFieldsValue(record);
                        }}
                    >编辑</Button>
                    <Button danger onClick={() => {
                        Modal.confirm({
                            title: '提示',
                            content: '确定删除吗？该作业下的学习记录都会被删除，且删除后无法恢复！',
                            okText: '确定',
                            cancelText: '取消',
                            onOk: () => {
                                services.deleteWork({workId: record.id}).then((data) => {
                                    if (data) {
                                        message.success("删除成功");
                                        OnQueryWork();
                                    } else {
                                        message.error("删除失败");
                                    }
                                });
                            }
                        });
                    }}>删除</Button>
                </div>
            ),
        },
    ];

    const learnRecordHeaders = [
        {
            title: "选中",
            dataIndex: "select",
            key: "select",
            render: (text: any, record: any) => {
                return (
                    <Checkbox onChange={(e) => handleCheckboxChange(e, record.id)}/>
                );
            },
        },
        {
            title: "记录编号",
            dataIndex: "id",
            key: "id",
        },
        {
            title: "进度",
            dataIndex: "progress",
            key: "progress",
            render: (text: any, record: any) => {
                let foundOption = progressEnum.find(
                    (item) => item.id === record.progress
                );
                const option = foundOption
                    ? foundOption
                    : {id: -1, status: "processing", text: "进行中"};
                return (
                    // @ts-ignore
                    <Badge status={option.status} text={option.text}></Badge>
                );
            },
        },
        {
            title: "分数",
            dataIndex: "score",
            key: "score",
        },
        {
            title: "完成时间",
            dataIndex: "completionTime",
            key: "completionTime",
            render: (text: any, record: any) => {
                return <Tag color="green">{record.completionTime}</Tag>;
            },
        },
        {
            title: "难易程度",
            dataIndex: "easyType",
            key: "easyType",
            render: (text: any, record: any) => {
                let foundOption = easyTypeEnum.find(
                    (item) => item.id === record.easyType
                );
                const option = foundOption
                    ? foundOption
                    : {id: -1, color: "processing", text: ""};
                return (
                    // @ts-ignore
                    <Tag color={option.color}>{option.text}</Tag>
                );
            },
        },
        {
            title: "备注",
            dataIndex: "remark",
            key: "remark",
        },
        {
            title: "操作",
            dataIndex: "completionTime",
            key: "completionTime",
            render: (text: any, record: any) => {
                return (
                    <Button
                        onClick={() => {
                            setEditLearnRecordVisible(true);
                            editLearnRecordForm.setFieldsValue(record);
                        }}
                    >
                        编辑
                    </Button>
                );
            },
        },
    ];

    const OnAddWork = async () => {
        try {
            await addWorkForm.validateFields();
            const values = await addWorkForm.getFieldsValue();
            services.addWork(values).then((data: any) => {
                if (data === true) {
                    message.success("添加成功");
                    setAddWorkVisible(false);
                    addWorkForm.resetFields();
                    OnQueryWork();
                }
            });
        } catch (e) {
            return;
        }
    };
    const OnAddLearnRecordByHand = () => {
        let fieldValue = addLearnRecordForm.getFieldValue("completionTime");
        let fieldsValue = addLearnRecordForm.getFieldsValue();
        if (fieldValue) {
            fieldValue = moment(fieldValue).format("YYYY-MM-DD HH:mm:ss"); //这么解决的
            fieldsValue.completionTime = fieldValue;
        }

        fieldsValue.workId = handDeleteRecordWorkId;
        services.addLearnRecordByHand(fieldsValue).then((data: any) => {
            if (data === true) {
                message.success("添加成功");
                setAddLearnRecordVisible(false);
                addLearnRecordForm.resetFields();
                OnQueryWork();
            }
        });
    };

    // @ts-ignore
    // @ts-ignore
    // @ts-ignore
    // @ts-ignore
    return (
        <div>
            <div
                style={{
                    display: "flex",
                    justifyContent: "space-between",
                    alignItems: "center",
                }}
            >
                <h1>作业管理</h1>
                <Button
                    className="custom-green-button"
                    style={{margin: "20px 0 20px 30px"}}
                    onClick={() => {
                        setAddWorkVisible(true);
                    }}
                    icon={<PlusOutlined/>}
                >
                    新增作业项{" "}
                </Button>
            </div>
            <div>
                <Space size={30}>
                    <Select
                        style={{width: "400px"}}
                        placeholder={"根据课程名称或编号查找课程"}
                        showSearch
                        allowClear={true}
                        filterOption={(input, option) =>
                            (option?.children as unknown as string)
                                ?.toLowerCase()
                                .indexOf(input.toLowerCase()) >= 0 ||
                            String(option?.value).indexOf(input) >= 0
                        }
                        onChange={setCourseId}
                    >
                        {allCourse.map(({id, courseNameAndNo}) => (
                            <Option key={id} value={String(id)}>
                                {courseNameAndNo}
                            </Option>
                        ))}
                    </Select>
                    <Select
                        style={{width: "200px"}}
                        allowClear={true}
                        placeholder="请选择作业类型"
                        value={workType}
                        onChange={setWorkType}
                    >
                        {workTypeEnum.map((data) => (
                            <Option key={data.id} value={data.id}>
                                {data.option}
                            </Option>
                        ))}
                    </Select>
                    <Button type="primary" onClick={OnQueryWork}>
                        查询
                    </Button>
                </Space>
            </div>
            <div style={{marginTop: "50px"}}>
                <Table
                    dataSource={workList}
                    columns={workHeaders}
                    bordered
                    expandable={{
                        expandedRowRender: (record) => (
                            <div
                                style={{
                                    backgroundColor: "#bbb3b8",
                                    margin: "16px 0",
                                    padding: "16px",
                                    borderRadius: "8px",
                                }}
                            >
                                <h2>学习记录</h2>
                                <div style={{marginBottom: "30px"}}>
                                    <Space style={{marginBottom: "10px"}}>
                                        <Button
                                            onClick={() => {
                                                setAddLearnRecordVisible(true);
                                                setHandDeleteRecordWorkId(record.id);
                                            }}
                                        >
                                            手动录入
                                        </Button>
                                        <Button
                                            type="primary"
                                            danger
                                            onClick={() => {
                                                if (selectedRowIds.length < 1) {
                                                    message.error("请选择需要删除的学习记录");
                                                    return;
                                                }
                                                Modal.confirm({
                                                    title: "删除学习记录",
                                                    centered: true,
                                                    content:
                                                        "是否删除编号为【 " +
                                                        selectedRowIds +
                                                        "】的学习记录?",
                                                    okText: "确认删除",
                                                    onOk() {
                                                        services
                                                            .deleteBatchLearnRecord({
                                                                learnRecordIdList: selectedRowIds,
                                                            })
                                                            .then((data: any) => {
                                                                if (data === true) {
                                                                    message.success("删除成功");
                                                                    setSelectedRowIds([]);
                                                                    OnQueryWork();
                                                                } else {
                                                                    message.error("删除失败");
                                                                }
                                                            });
                                                    },
                                                    cancelText: "取消",
                                                });
                                            }}
                                        >
                                            批量删除
                                        </Button>
                                        <Button
                                            type="primary"
                                            onClick={() => {
                                                setVisible(true);
                                                setDrawerData(record);
                                            }}
                                        >
                                            <CheckCircleTwoTone/>
                                            分析统计
                                        </Button>
                                    </Space>
                                    <div>
                                        <Upload
                                            onChange={handleUploadChange}
                                            name="uploadLearnRecordFile"
                                            accept=".excel,.xls,.xlsx"
                                            action={
                                                "/clpms/learnRecord/v1/uploadLearnRecordFile?workId=" +
                                                record.id
                                            }
                                        >
                                            <Button type="primary" icon={<UploadOutlined/>}>
                                                附件导入
                                            </Button>
                                        </Upload>
                                    </div>
                                </div>

                                <Table
                                    dataSource={record.learnRecordForWorkResp}
                                    columns={learnRecordHeaders}
                                    pagination={false}
                                    locale={{emptyText: "当前作业还没有学习记录"}}
                                />
                            </div>
                        ),
                        expandedRowKeys,
                        onExpand: (expanded, record) => {
                            setSelectedRowIds([]);
                            if (expanded) {
                                // @ts-ignore
                                setExpandedRowKeys([record.id]);
                            } else {
                                setExpandedRowKeys([]);
                            }
                        },
                    }}
                    rowKey="id"
                    style={{tableLayout: "fixed"}}
                ></Table>
            </div>

            <Modal
                visible={addLearnRecordVisible}
                title={"手动录入学习记录"}
                onCancel={() => {
                    setAddLearnRecordVisible(false);
                    addLearnRecordForm.resetFields();
                }}
                cancelText={"取消"}
                okText={"确定录入"}
                onOk={() => {
                    OnAddLearnRecordByHand();
                }}
            >
                <Form form={addLearnRecordForm}>
                    <Form.Item
                        label="进度"
                        name="progress"
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <Select
                            style={{width: "200px"}}
                            allowClear={true}
                            placeholder="请选择完成进度"
                            onChange={(value) => {
                                addLearnRecordForm.setFieldsValue({progress: value});
                            }}
                        >
                            {progressEnum.map((data) => (
                                <Option key={data.id} value={data.id}>
                                    {data.text}
                                </Option>
                            ))}
                        </Select>
                    </Form.Item>
                    <Form.Item
                        label="分数"
                        name="score"
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <Input type="number"/>
                    </Form.Item>
                    <Form.Item
                        label="完成时间"
                        name="completionTime"
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <DatePicker
                            showTime
                            format="YYYY-MM-DD HH:mm:ss"
                            placeholder={"选择完成时间"}
                        />
                    </Form.Item>
                    <Form.Item
                        label="难易程度"
                        name="easyType"
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <Select
                            style={{width: "200px"}}
                            allowClear={true}
                            placeholder="请选择完成难易程度"
                            onChange={(value) => {
                                addLearnRecordForm.setFieldsValue({easyType: value});
                            }}
                        >
                            {easyTypeEnum.map((data) => (
                                <Option key={data.id} value={data.id}>
                                    <Tag color={data.color}>{data.text}</Tag>
                                </Option>
                            ))}
                        </Select>{" "}
                    </Form.Item>
                    <Form.Item
                        label="备注"
                        name="remark"
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <Input/>
                    </Form.Item>
                </Form>
            </Modal>

            <Drawer
                // @ts-ignore
                // @ts-ignore
                title={"【" + drawerData?.name + "】" + "的学习记录统计分析"}
                placement="right"
                closable={false}
                onClose={() => {
                    setVisible(false);
                }}
                visible={visible}
                extra={
                    <Space>
                        <Button
                            onClick={() => {
                                setVisible(false);
                            }}
                            type="primary"
                        >
                            关闭
                        </Button>
                    </Space>
                }
                width="66.6667%"
            >
                <div
                    style={{
                        backgroundColor: "#ffe8ba",
                        borderRadius: "10px",
                        transform: "scale(0.92)",
                    }}
                >
                    <h2>（1）进度统计</h2>
                    <ProgressAnalysis
                        // @ts-ignore
                        progressData={drawerData?.learnRecordForWorkResp}
                    />
                </div>

                <div
                    style={{
                        backgroundColor: "#d9d9d9",
                        borderRadius: "10px",
                        transform: "scale(0.92)",
                    }}
                >
                    <h2>（2）分数统计</h2>
                    <ScoreAnalysis
                        // @ts-ignore
                        scores={drawerData?.learnRecordForWorkResp}
                    />
                </div>

                <div
                    style={{
                        backgroundColor: "#f7d6d0",
                        borderRadius: "10px",
                        transform: "scale(0.92)",
                    }}
                >
                    <h2>（3）完成时间统计</h2>
                    <CompletionTimeAnalysis
                        // @ts-ignore
                        learnRecords={drawerData?.learnRecordForWorkResp}
                    />
                </div>

                <div
                    style={{
                        backgroundColor: "#f9cb9c",
                        borderRadius: "10px",
                        transform: "scale(0.92)",
                    }}
                >
                    <h2>（4）难易程度统计</h2>
                    <EasyTypeAnalysis
                        // @ts-ignore
                        learnRecords={drawerData?.learnRecordForWorkResp}
                    />
                </div>
            </Drawer>

            <Modal
                visible={addWorkVisible}
                title={"新增作业项"}
                onCancel={() => {
                    setAddWorkVisible(false);
                    addWorkForm.resetFields();
                }}
                cancelText={"取消"}
                okText={"新增"}
                onOk={() => {
                    OnAddWork();
                }}
            >
                <Form form={addWorkForm}>
                    <Form.Item
                        label="作业名称"
                        name="name"
                        rules={[{required: true, message: "请输入作业名称"}]}
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <Input/>
                    </Form.Item>
                    <Form.Item
                        label="作业类型"
                        name="workType"
                        rules={[{required: true, message: "请选择作业类型"}]}
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <Select
                            style={{width: "200px"}}
                            allowClear={true}
                            placeholder="请选择作业类型"
                            onChange={(value) => {
                                addWorkForm.setFieldsValue({workType: value});
                            }}
                        >
                            {workTypeEnum.map((data) => (
                                <Option key={data.id} value={data.id}>
                                    {data.option}
                                </Option>
                            ))}
                        </Select>
                    </Form.Item>
                    <Form.Item
                        label="所属课程"
                        name="courseId"
                        rules={[{required: true, message: "请选择作业所属课程"}]}
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <Select
                            placeholder={"请选择作业所属课程"}
                            showSearch
                            allowClear={true}
                            filterOption={(input, option) =>
                                (option?.children as unknown as string)
                                    ?.toLowerCase()
                                    .indexOf(input.toLowerCase()) >= 0 ||
                                String(option?.value).indexOf(input) >= 0
                            }
                            onChange={(value) => {
                                addWorkForm.setFieldsValue({courseId: value});
                            }}
                        >
                            {allCourse.map(({id, courseNameAndNo}) => (
                                <Option key={id} value={String(id)}>
                                    {courseNameAndNo}
                                </Option>
                            ))}
                        </Select>
                    </Form.Item>
                    <Form.Item
                        label="备注"
                        name="remark"
                        labelCol={{span: 6}}
                        wrapperCol={{span: 18}}
                    >
                        <Input/>
                    </Form.Item>
                </Form>
            </Modal>

            <Modal
                visible={editLearnRecordVisible}
                title={"编辑学习记录"}
                onCancel={() => {
                    setEditLearnRecordVisible(false);
                    editLearnRecordForm.resetFields();
                }}
                cancelText={"取消"}
                okText={"确定修改"}
                onOk={() => {
                    services.updateLearnRecord(editLearnRecordForm.getFieldsValue())
                        .then((data: any) => {
                            if (data) {
                                message.success("修改成功");
                                OnQueryWork();
                                setEditLearnRecordVisible(false);
                                editLearnRecordForm.resetFields();
                            } else {
                                message.error("修改失败");
                            }
                        })
                }}
            >
                <Form form={editLearnRecordForm}>
                    <Form.Item label="记录编号" name="id"
                               labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Input placeholder="id" readOnly/>
                    </Form.Item>
                    <Form.Item label="进度" name="progress"
                               labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Select
                            style={{width: '200px'}}
                            allowClear={true}
                            placeholder='请选择进度'
                            onChange={(value) => {
                                editLearnRecordForm.setFieldsValue({progress: value});
                            }
                            }
                        >
                            {progressEnum.map((data) => <Option key={data.id} value={data.id}>
                                    {data.text}
                                </Option>
                            )
                            }
                        </Select>
                    </Form.Item>
                    <Form.Item label="分数" name="score"
                               labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Input/>
                    </Form.Item>

                    <Form.Item label="难易程度" name="easyType" labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Select
                            style={{width: '200px'}}
                            allowClear={true}
                            placeholder='请选择完成难易程度'
                            onChange={(value) => {
                                editLearnRecordForm.setFieldsValue({easyType: value});
                            }
                            }
                        >
                            {easyTypeEnum.map((data) => <Option key={data.id} value={data.id}>
                                    <Tag color={data.color}>{data.text}</Tag>
                                </Option>
                            )
                            }
                        </Select>
                    </Form.Item>
                    <Form.Item label="备注" name="remark" labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Input.TextArea autoSize={{minRows: 3, maxRows: 8}}/>
                    </Form.Item>
                </Form>
            </Modal>

            <Modal
                visible={editWorkVisible}
                title={"编辑作业"}
                onCancel={() => {
                    setEditWorkVisible(false);
                    editWorkForm.resetFields();
                }}
                cancelText={"取消"}
                okText={"确定修改"}
                onOk={() => {
                    services.updateWork(editWorkForm.getFieldsValue())
                        .then((data: any) => {
                            if (data) {
                                message.success("修改成功");
                                OnQueryWork();
                                setEditWorkVisible(false);
                                editWorkForm.resetFields();
                                OnQueryWork();
                            } else {
                                message.error("修改失败");
                            }
                        })
                }}
            >
                <Form form={editWorkForm}>
                    <Form.Item label={'id'} name="id" className='hidden-field'>
                        <Input placeholder="id"/>
                    </Form.Item>
                    <Form.Item label="作业编号" name="workNo"
                               labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Input placeholder="workNo" readOnly/>
                    </Form.Item>

                    <Form.Item label="作业名称" name="name"
                               labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Input placeholder="请输入作业名称"/>
                    </Form.Item>
                    <Form.Item label="作业类型" name="workType"
                               labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Select
                            style={{width: '200px'}}
                            allowClear={true}
                            placeholder='请选择进作业类型'
                            onChange={(value) => {
                                editWorkForm.setFieldsValue({workType: value});
                            }
                            }
                        >
                            {workTypeEnum.map((data) => <Option key={data.id} value={data.id}>
                                    {data.option}
                                </Option>
                            )
                            }
                        </Select>
                    </Form.Item>
                    <Form.Item label="备注" name="remark" labelCol={{span: 6}} wrapperCol={{span: 18}}>
                        <Input.TextArea autoSize={{minRows: 3, maxRows: 8}}/>
                    </Form.Item>
                </Form>
            </Modal>
        </div>
    );
};

export default Work;
